package com.jg.blog.controller;

import com.jg.blog.exception.BlogException;
import com.jg.blog.utils.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @RequestMapping(value = "/test1", method = RequestMethod.GET)
    public Result<?> test() {
        return new Result<>();
    }
    @RequestMapping(value = "/test2", method = RequestMethod.GET)
    public Result<?> test2() {
        throw new BlogException("操作失败");
    }

}
